package org.example.design.decorator;

import org.example.design.decorator.itf.impl.LoginSsoDecorator02;
import org.example.design.decorator.itf.impl.SsoInterceptor;

/**
 * @Classname Test01
 * @Description TODO
 * @Date 2020/11/5 10:19 上午
 * @Created by xiangjd
 */
public class Test01 {
    public static void main(String[] args) {
        LoginSsoDecorator02 loginSsoDecorator02 = new LoginSsoDecorator02(new SsoInterceptor());
        String requset = "1successhuahua";
        boolean success = loginSsoDecorator02.prehandle(requset, "ewcdqwt40liuiu", "t");
        System.out.println("模拟方法拦截开始： " + requset + (success ? "放行" : "拦截"));
    }
}
